package com.wh.controller;

import com.wh.common.ApiRestResponse;
import com.wh.model.dto.FirstDepartMentDto;
import com.wh.service.FirstDepartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author: wh(1835734390 @ qq.com)
 * @date: 2022/11/18 22:29
 * @description:
 * @version:
 */
@RestController
public class DepartMentController {
    @Autowired
    private FirstDepartService firstDepartService;
    //查询所有科室
    @GetMapping("/dep/all")
    public ApiRestResponse getAllDepartMent(HttpServletRequest request){
        List<FirstDepartMentDto> allDep = firstDepartService.getAllDep();
        return ApiRestResponse.success(allDep);
    }
}
